package com.wuxiaofan.controller;

import com.wuxiaofan.vo.ReturnResult;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wuxiaofan
 * @date 2021/9/13 5:14 下午
 */
@RestController
@Api("调试接口")
public class TestController {

    private static String keyword;

    static InnerTest innerTest;

    public static void main(String[] args) {
        test("124");
    }

    public static void test(String newKeyword) {
        if (innerTest == null) {
            innerTest = new InnerTest() {
                @Override
                public void add(String str) {
                    keyword = newKeyword;
                    super.add(keyword);
                }
            };
        }
        innerTest.add(keyword);
    }
}
